package model;
import engine.Utils;

public class Node{
	public String node;
	public Point p;
	public Segment segment;
	public Trapezoid t;
	public Node left;
	public Node right;

	
	
	public Node(String node, Trapezoid t) {
		this.node = node;
		this.t = t;
	}

	public Node(){
		node = "";
		left = null;
		right = null;
		t = null;
		p = null;
	}

	public boolean isLeft(Point point){
		return point.x < p.x;
	}

	public boolean isAbove(Point point){
		int i = Utils.counterClockWise(segment.left, segment.right, point);
		return i <= 0;
	}

	public String toString(){
		return "Node : .node = "+node+"; p = "+p+"; left = "+left+"; right = "+right+"; t = "+t;
	}
}
